﻿namespace WebApi.Models.Common
{
    /// <summary>
    /// 分页响应实体
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class PageResultModel<T>
    {
        /// <summary>
        /// 总数
        /// </summary>
        public int TotalCount { get; set; }

        /// <summary>
        /// 结果
        /// </summary>
        public List<T>? Result { get; set; }
    }

    /// <summary>
    /// 分页请求实体
    /// </summary>
    public class PageRequestModel
    {
        /// <summary>
        /// 每页条数
        /// </summary>
        public int PageSize { get; set; } = 10;

        /// <summary>
        /// 当前页数
        /// </summary>
        public int PageIndex { get; set; } = 1;

        /// <summary>
        /// 是否分页
        /// </summary>
        public bool IsPage { get; set; } = true;
    }
}
